package com.jewaton.auth.commons.entity;


import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;

/**
 * 地区表
 */
@Entity
@Table(name = "DISTRICT")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class District implements java.io.Serializable {

	private String did;
	private String districtName;
	private String description;
	private String parentId;
	private String dcode;
	private String zipCode;
	private Integer isCommon;


    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "DID", unique = true, nullable = false, length = 100)
	public String getDid() {
		return this.did;
	}

	public void setDid(String did) {
		this.did = did;
	}

	@Column(name = "DISTRICT_NAME", nullable = false, length = 100)
	public String getDistrictName() {
		return this.districtName;
	}

	public void setDistrictName(String districtName) {
		this.districtName = districtName;
	}

	@Column(name = "DESCRIPTION")
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "PARENT_ID", length = 32)
	public String getParentId() {
		return this.parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	@Column(name = "DCODE", nullable = false, length = 6)
	public String getDcode() {
		return dcode;
	}

	public void setDcode(String dcode) {
		this.dcode = dcode;
	}

	@Column(name = "ZIP_CODE", nullable = false, length = 6)
	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	@Column(name = "IS_COMMON", nullable = true)
	public Integer getIsCommon() {
		return isCommon;
	}

	public void setIsCommon(Integer isCommon) {
		this.isCommon = isCommon;
	}

}
